package com.geccocrawler.gecco.demo.test;

import com.geccocrawler.gecco.GeccoEngine;
import com.geccocrawler.gecco.annotation.Gecco;
import com.geccocrawler.gecco.request.HttpGetRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

@Gecco(matchUrl = "http://www.tsc.edu.cn/col/1323592874437/index.html", pipelines={"consolePipeline", "aallSortPipeline"})
public class AllSort implements HtmlBean {

	private static final long serialVersionUID = 665662335318691818L;
	



	public static void main(String[] args) {
		//先获取分类列表
		HttpGetRequest start = new HttpGetRequest("http://www.tsc.edu.cn/col/1323592874437/index.html");
		start.setCharset("GBK");
		GeccoEngine.create()
		.classpath("com.geccocrawler.gecco.demo.test")
		//开始抓取的页面地址
		.start(start)
		
		//单个爬虫每次抓取完一个请求后的间隔时间
		.interval(2000)
		.run();
		
	
	}
}
